package com.ieslab.powergrid.demosvr.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/aop")
public class AopController {

    /**
     * 测试接口
     * @param name 名称
     * @return
     */
    @GetMapping("/test/{name}")
    public String testAop(@PathVariable String name) {
        return "Hello " + name;
    }

    /**
     * 测试接口
     * @param
     * @return
     */
    @GetMapping("/testException")
    public String testException() {
        int num = 1/0;
        return "Hello world";
    }

}
